package com.ruoyi.project.keshi.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.keshi.domain.SysRegistfee;
import com.ruoyi.project.keshi.mapper.SysRegistfeeMapper;
import com.ruoyi.project.keshi.service.ISysRegistfeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 挂号费用Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-12
 */
@Service
public class SysRegistfeeServiceImpl implements ISysRegistfeeService
{
    @Autowired
    private SysRegistfeeMapper sysRegistfeeMapper;

    /**
     * 查询挂号费用
     *
     * @param guaId 挂号费用ID
     * @return 挂号费用
     */
    @Override
    public SysRegistfee selectSysRegistfeeById(Long guaId)
    {
        return sysRegistfeeMapper.selectSysRegistfeeById(guaId);
    }

    /**
     * 查询挂号费用列表
     *
     * @param sysRegistfee 挂号费用
     * @return 挂号费用
     */
    @Override
    public List<SysRegistfee> selectSysRegistfeeList(SysRegistfee sysRegistfee)
    {
        return sysRegistfeeMapper.selectSysRegistfeeList(sysRegistfee);
    }

    /**
     * 新增挂号费用
     *
     * @param sysRegistfee 挂号费用
     * @return 结果
     */
    @Override
    public int insertSysRegistfee(SysRegistfee sysRegistfee)
    {
        sysRegistfee.setCreateTime(DateUtils.getNowDate());
        return sysRegistfeeMapper.insertSysRegistfee(sysRegistfee);
    }

    /**
     * 修改挂号费用
     *
     * @param sysRegistfee 挂号费用
     * @return 结果
     */
    @Override
    public int updateSysRegistfee(SysRegistfee sysRegistfee)
    {
        sysRegistfee.setUpdateTime(DateUtils.getNowDate());
        return sysRegistfeeMapper.updateSysRegistfee(sysRegistfee);
    }

    /**
     * 批量删除挂号费用
     *
     * @param guaIds 需要删除的挂号费用ID
     * @return 结果
     */
    @Override
    public int deleteSysRegistfeeByIds(Long[] guaIds)
    {
        return sysRegistfeeMapper.deleteSysRegistfeeByIds(guaIds);
    }

    /**
     * 删除挂号费用信息
     *
     * @param guaId 挂号费用ID
     * @return 结果
     */
    @Override
    public int deleteSysRegistfeeById(Long guaId)
    {
        return sysRegistfeeMapper.deleteSysRegistfeeById(guaId);
    }
}
